package com.joonggo.gip.service;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.joonggo.gip.dao.UserDao;
import com.joonggo.gip.vo.User;

@Service
public class UserServiceImpl implements UserService{
	@Autowired
	UserDao userDao;
	
	public int addUser(User user) throws Exception {
		System.out.println("===============================");
		userDao.insert(user);
		System.out.println("user = " + user);
		return 1;
	}
	
	@Override
	@Transactional(rollbackFor=Exception.class)
	public int removeUser(String user_Id) throws Exception {
		// TODO Auto-generated method stub
		return userDao.delete(user_Id);
	}
}
